package exam;

public class test {
    public static void main(String[] args) {
        int i = 1;
        int sum = 0;
        for(;i<500;i++){
            sum = sum + i;
            if(sum>=435){
                System.out.print(i+" " + sum);
                break;
            }
        }
    }
}
